package com.hqq.util;

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;

import java.util.Collection;
import java.util.Map;

/**
 * CollectionUtil
 * 集合类帮助类
 * <p>
 * 对{@link org.apache.commons.collections.CollectionUtils}
 * {@link  org.apache.commons.collections.MapUtils}的封装
 * <p>
 * Created by heqianqian on 2017/7/19.
 */
public class CollectionUtil {

    public static boolean isEmpty(Collection<?> collection) {
        return CollectionUtils.isEmpty(collection);
    }

    public static boolean isNotEmpty(Collection<?> collection) {
        return !CollectionUtils.isEmpty(collection);
    }

    public static boolean isEmpty(Map map) {
        return MapUtils.isEmpty(map);
    }

    public static boolean isNotEmpty(Map map) {
        return !MapUtils.isEmpty(map);
    }

}
